Campaign Targeting Guide
The Rules Engine enables sophisticated campaign targeting through a combination of contextual data points. Here's how to build effective targeting strategies:
Basic Targeting Scenarios
1. Demographic Targeting
{
"type": "json-logic",
"id": "young-adult-rule",
"rule": {
"and": [
{">=": [{"var": "environment.user.age"}, 18]},
{"<=": [{"var": "environment.user.age"}, 34]},
{"==": [{"var": "environment.user.sex"}, "f"]}
]
}
}
Use cases:
- Fashion campaigns targeting young women
- Educational content for college-age audiences
- First-time homebuyer promotions
2. Device and Platform Targeting
{
"type": "json-logic",
"id": "mobile-ios-rule",
"rule": {
"and": [
{"==": [{"var": "environment.device.type"}, "mobile"]},
{"==": [{"var": "environment.device.os"}, "ios"]},
{">=": [{"var": "environment.device.osVersion"}, "15.0"]}
]
}
}
Use cases:
- Mobile app promotions
- OS-specific feature announcements
- Device-optimized content delivery
Advanced Targeting Scenarios
1. Weather-Based Contextual Targeting
{
"type": "json-logic",
"id": "weather-based-campaign",
"rule": {
"or": [
{
"and": [
{"<": [{"var": "environment.weather.temperature"}, 40]},
{"in": [
{"var": "environment.weather.condition"},
["snow", "sleet", "blizzard"]
]}
]
},
{
"and": [
{">": [{"var": "environment.weather.temperature"}, 85]},
{"==": [{"var": "environment.weather.condition"}, "clear"]}
]
}
]
}
}
Campaign applications:
- Winter clothing promotions during cold weather
- Air conditioner sales during heat waves
- Seasonal beverage promotions
- Weather-appropriate activity suggestions
2. Content-Aware Targeting
{
"type": "json-logic",
"id": "sports-content-rule",
"rule": {
"or": [
{
"some": {
"in": [{"var": "metadata.categories.iab[*].cat"}, ["IAB17", "IAB17-12", "IAB17-44"]]
}
},
{
"some": {
"in": [{"var": "metadata.keywords[*].keyword"}, ["sports", "athlete", "game", "competition"]]
}
}
]
}
}
Applications:
- Sports equipment ads during athletic content
- Themed promotions matching content category
- Brand safety filtering
- Content-relevant product placement
3. Behavioral Sequencing
{
"type": "json-logic",
"id": "engagement-sequence",
"rule": {
"and": [
{">": [{"var": "environment.user.session.impressions"}, 3]},
{">": [{"var": "environment.user.session.activations"}, 1]},
{"<": [{"var": "environment.user.session.errors"}, 1]}
]
}
}
Applications:
- Progressive engagement campaigns
- Multi-step promotional sequences
- User journey optimization
- Conversion funnel targeting
Sophisticated Campaign Strategies
1. Multi-Variable Location Targeting
{
"type": "json-logic",
"id": "location-based-campaign",
"rule": {
"and": [
{
"in": [
{"var": "environment.user.location.region"},
["Northeast", "Mid-Atlantic"]
]
},
{
"in": [
{"var": "environment.time.monthName"},
["june", "july", "august"]
]
},
{
"in": [
{"var": "environment.time.dayName"},
["saturday", "sunday"]
]
},
{
"between": [
{"var": "environment.time.hour"},
11, 18
]
}
]
}
}
Applications:
- Regional summer weekend promotions
- Location-specific event marketing
- Time-zone aware campaigns
- Seasonal retail promotions
2. Advanced Audience Segmentation
{
"type": "json-logic",
"id": "premium-audience-segment",
"rule": {
"and": [
{
">=": [{"var": "environment.user.activity.activityLevel.monthly"}, "high"]
},
{
">=": [{"var": "environment.user.session.activations"}, 5]
},
{
"some": {
"in": [{"var": "environment.user.segments[*]"}, ["premium_user", "high_value"]]
}
},
{
">=": [{"var": "environment.user.activity.avgSessionDuration"}, 300]
}
]
}
}
Applications:
- Premium product promotions
- Loyalty program targeting
- High-value customer campaigns
- Engagement-based offers
3. Contextual Moment Targeting
{
"type": "json-logic",
"id": "contextual-moment",
"rule": {
"and": [
{
"between": [
{"var": "moment.start"},
300000, 600000
]
},
{
">=": [{"var": "environment.media.duration"}, 1200000]
},
{
"some": {
"in": [{"var": "metadata.keywords[*].keyword"}, ["climax", "excitement", "tension"]]
}
}
]
}
}
Applications:
- Mid-content engagement points
- Dramatic moment targeting
- Strategic ad placement
- Content-aware interruptions
Campaign Optimization Techniques
1. A/B Testing Setup
{
"type": "json-logic",
"id": "ab-test-segment",
"rule": {
"and": [
{"==": [
{"mod": [{"var": "environment.user.id"}, 2]},
0
]},
// Other targeting criteria
{"==": [{"var": "environment.device.type"}, "mobile"]}
]
}
}
Best practices:
- Create control and test groups
- Isolate variables for testing
- Monitor performance metrics
- Implement gradual rollouts
2. Frequency Capping
{
"type": "json-logic",
"id": "frequency-cap",
"rule": {
"and": [
{"<": [{"var": "environment.user.session.impressions"}, 5]},
{">": [
{"var": "environment.user.activity.lastActionTime"},
{"date": "-1 hour"}
]}
]
}
}
Applications:
- Prevent ad fatigue
- Optimize engagement rates
- Manage user experience
- Control campaign pacing
3. Performance-Based Targeting
{
"type": "json-logic",
"id": "performance-optimization",
"rule": {
"and": [
{">": [{"var": "environment.user.activity.interactionFrequency"}, 0.15]},
{">=": [{"var": "environment.user.session.actions"}, 1]},
{"<=": [{"var": "environment.user.session.errors"}, 2]}
]
}
}
Optimization strategies:
- Target high-performing segments
- Adjust based on engagement metrics
- Optimize for conversion rates
- Scale successful campaigns
Industry-Specific Campaign Examples
1. Retail
{
"type": "json-logic",
"id": "retail-promotion",
"rule": {
"and": [
{"in": [{"var": "environment.time.localHoliday"}, ["black_friday", "cyber_monday"]]},
{">=": [{"var": "environment.user.session.impressions"}, 2]},
{"exists": {"var": "environment.user.interests.shopping"}}
]
}
}
2. Entertainment
{
"type": "json-logic",
"id": "entertainment-targeting",
"rule": {
"and": [
{"in": [{"var": "environment.media.genre"}, ["action", "adventure"]]},
{">=": [{"var": "moment.start"}, 300000]},
{"exists": {"var": "metadata.keywords[*].keyword"}}
]
}
}
3. Financial Services
{
"type": "json-logic",
"id": "financial-targeting",
"rule": {
"and": [
{">=": [{"var": "environment.user.age"}, 25]},
{"<=": [{"var": "environment.user.age"}, 45]},
{"in": [{"var": "metadata.categories.iab[*].cat"}, ["IAB13", "IAB13-1"]]}
]
}
}
Best Practices for Campaign Management
-
Rule Organization
- Group related rules logically
- Use consistent naming conventions
- Document rule purposes
- Maintain rule dependencies
-
Performance Optimization
- Monitor rule evaluation time
- Optimize complex conditions
- Use appropriate targeting granularity
- Cache frequently used contexts
-
Testing and Validation
- Test rules with sample contexts
- Verify rule combinations
- Monitor campaign performance
- Implement gradual rollouts
-
Maintenance and Updates
- Regular rule reviews
- Performance analysis
- Update targeting criteria
- Archive inactive rules